package com.zhc.tbschedule.demo.task;

import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Service;

import com.qlk.schedule.core.BusinessService;
import com.qlk.schedule.domain.Task;
/**
 * 测试标准task表
 * @author jinsicao
 * @since 2016-11-14
 */
@Service("testStandardTaskService")
public class TestStandardTaskService implements BusinessService<Task> {
	
	private static final Log LOG = LogFactory.getLog(TestStandardTaskService.class);
	
	@Override
	public boolean executeSingleTask(Task task, String ownSign) throws Exception {
		boolean result = false;
		String body = task.getBody();
		
		if (StringUtils.isNotBlank(body)) {
			// TODO do something
			result = true;
		}
		
		LOG.info(String.format("TestStandardTaskService#executeSingleTask body【%s】， reslut【%s】", body, result));
		return result;
	}

}
